<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<base href="/bestinc/" />
<!--layui的css样式-->
<link rel="stylesheet" href="static/layui/css/layui.css" media="all" />
<!--自定义css样式-->
<link rel="stylesheet" href="static/css/route/resource/map.css" />
<!--layui的js样式-->
<script type="text/javascript" src="static/layui/layui.js"></script>
<!--百度地图-->
<script type="text/javascript"
	src="http://api.map.baidu.com/api?v=3.0&ak=C59f573001c2da1eced570db6c53cdf1"></script>
<!--自定义js-->

<!--自定义百度地图js样式-->
<script type="text/javascript" src="//api.map.baidu.com/library/TextIconOverlay/1.2/src/TextIconOverlay_min.js"></script>
<script type="text/javascript" src="//api.map.baidu.com/library/MarkerClusterer/1.2/src/MarkerClusterer_min.js"></script>
<script type="text/javascript" src="static/js/jquery.min.js"></script>
<title></title>

</head>

<body>

	<div class="layui-fluid fDiv">
		<div class="layui-row layui-col-space10 fDiv">

			<!-- 百度地图 End -->
			<!-- 表格主体 -->
			<div class="layui-col-sm7 layui-col-md7 fDiv"
				style="padding-top: 1%;">
				<div class="searchDiv">
					<form class="layui-form">
						<div class="layui-form-item">
							<div class="layui-inline">
								<label class="layui-form-label">城市名字</label>
								<div class="layui-input-inline">
									<input id="city" type="text"  placeholder="请输入"
										autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-inline">
								<label class="layui-form-label">车站名字</label>
								<div class="layui-input-inline">
									<input id="busStationName" type="text"
										placeholder="请输入" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-inline">
								<label class="layui-form-label">车站位置</label>
								<div class="layui-input-inline" style="width: 82px;">
									<input type="text" id="longitude" 
										placeholder="经度" autocomplete="off" class="layui-input">
								</div>
								<div class="layui-form-mid">-</div>
								<div class="layui-input-inline" style="width: 82px;">
									<input type="text" id="latitude" 
										placeholder="纬度" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-inline">
								<label class="layui-form-label">是否可用</label>
								<div class="layui-input-inline">
									<select id="useable">
										<option value="">请选择</option>
										<option value="Y">可用</option>
										<option value="N">禁用</option>
									</select>
								</div>
							</div>

							<div class="layui-inline">
								<label class="layui-form-label"></label>
								<div class="layui-input-inline" style="left: 50%;">
									<button class="layui-btn" lay-submit=""
										lay-filter="busStationSearchBtn">
										<i class="layui-icon layui-icon-search"
											style="font-size: 14px;"></i> 查询
									</button>
									<button class="layui-btn" type="reset">
										<i class="layui-icon layui-icon-refresh "
											style="font-size: 14px;"></i> 重置
									</button>
								</div>
							</div>
						</div>
					</form>

				</div>
				<div id="dataDiv">
					<table class="layui-hide" id="busStationTable" lay-filter="test"></table>
				</div>
			</div>
			<!-- 表格主体 End -->
			<!-- 百度地图 -->
			<div class="layui-col-sm5 layui-col-md5 fDiv"
				style="padding-top: 1%;">
				<div class="fDiv ">
					<div id="allmap" class="mapDiv"></div>
				</div>
			</div>
		</div>
	</div>

	<!-- 添加模态框 -->
	<div id="addBusStationModal" class="definedModal">
		<form id="addBusStationForm" lay-filter="addBusStationForm" class="layui-form" action="">
		<input type="hidden" name="busStationId"> <!-- 汽车站Id -->
		<input type="hidden" name="telephone"> <!-- 电话号码 -->
		<div class="layui-form-item">
			<label class="layui-form-label">地址搜索</label>
			<div class="layui-input-block">
				<input type="text" id="suggestId" lay-verify="required"
					placeholder="请输入地址信息" autocomplete="off" class="search layui-input ">
			</div>
		</div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">所在城市</label>
			<div class="layui-input-block">
				<input type="text" name=city lay-verify="required"
					placeholder="请输入所在城市" autocomplete="off" class="layui-input" disabled>
			</div>
		</div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">车站名字</label>
			<div class="layui-input-block">
				<input type="text" name=busStationName lay-verify="required"
					placeholder="请输入车站名字" autocomplete="off" class="layui-input" disabled>
			</div>
		</div>
		
		<div id="searchResultPanel" style="border: 1px solid blue; width: 150px; height: auto; display: none;"></div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">车站地址</label>
			<div class="layui-input-block">
				<input type="text" name="address" lay-verify="required"
					placeholder="请输入车站地址" autocomplete="off" class="layui-input" disabled>
			</div>
		</div>
		
		<div class="layui-form-item">
		<!-- <div class="layui-inline" style="margin-bottom: 10px;"> -->
			<label class="layui-form-label">车站位置</label>
			<div class="layui-input-inline" style="width: 160px;float: left;
    margin-left: 0px;"">
				<input type="text" name="longitude" placeholder="经度"
					autocomplete="off" class="layui-input" disabled>
			</div>
			 <div class="layui-form-mid" style="margin-left: 10px">-</div>
			<div class="layui-input-inline" style="width: 155px; float: right;
    margin-right: 0px;">
				<input type="text" name="latitude" placeholder="纬度"
					autocomplete="off" class="layui-input" disabled>
			</div>
		<!-- </div> -->
		</div>
		
		<!--<div class="layui-form-item">
			    <label class="layui-form-label">联系电话</label>
			    <div class="layui-input-block">
			      <input type="text" name="userName" lay-verify="required" placeholder="请输入联系人电话" autocomplete="off" class="layui-input">
			    </div>
			  </div> -->
		<div class="layui-form-item">
			<div id="l-map" style="margin-left: 40px; width: 438px; height: 200px; text-align: right;"></div>
		</div>

		<div class="layui-input-block" style="text-align: right;">
			<button type="submit" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="addbusStationBtn">添加</button>
			<button type="button" class="layui-btn layui-btn-primary  modalClose">关闭</button>
			
		</div>
		</form>
	</div>
	<!-- 添加模态框 End -->
	
	<!-- 修改模态框 -->
	<div id="updateBusStationModal" class="definedModal">
		<form id="updateBusStationForm" lay-filter="updateBusStationForm" class="layui-form" action="">
		<input type="hidden" name="busStationId"> <!-- 汽车站Id -->
		<input type="hidden" name="_method" value="PUT"/>
		<!-- <div class="layui-form-item">
			<label class="layui-form-label">地址搜索</label>
			<div class="layui-input-block">
				<input type="text" id="suggestId" 
					placeholder="请输入地址信息" autocomplete="off" class="layui-input">
			</div>
		</div> -->
		
		<div class="layui-form-item">
			<label class="layui-form-label">所在城市</label>
			<div class="layui-input-block">
				<input type="text" id="city" name=city lay-verify="required"
					placeholder="请输入所在城市" autocomplete="off" class="layui-input">
			</div>
		</div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">车站名字</label>
			<div class="layui-input-block">
				<input type="text" id="busStationName" name=busStationName lay-verify="required"
					placeholder="请输入车站名字" autocomplete="off" class="layui-input">
			</div>
		</div>
		
		<div id="searchResultPanel" style="border: 1px solid blue; width: 150px; height: auto; display: none;"></div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">车站地址</label>
			<div class="layui-input-block">
				<input type="text" id="address" name="address" lay-verify="required"
					placeholder="请输入车站地址" autocomplete="off" class="layui-input">
			</div>
		</div>
		
		<div class="layui-form-item">
		<!-- <div class="layui-inline" style="margin-bottom: 10px;"> -->
			<label class="layui-form-label">车站位置</label>
			<div class="layui-input-inline" style="width: 160px;float: left;
    margin-left: 0px;"">
				<input type="text" id="longitude" name="longitude" placeholder="经度"
					autocomplete="off" class="layui-input">
			</div>
			 <div class="layui-form-mid" style="margin-left: 10px">-</div>
			<div class="layui-input-inline" style="width: 155px; float: right;
    margin-right: 0px;">
				<input type="text" id="latitude" name="latitude" placeholder="纬度"
					autocomplete="off" class="layui-input">
			</div>
		</div>
		
		<div class="layui-form-item">
			    <label class="layui-form-label">联系电话</label>
			    <div class="layui-input-block">
			      <input type="text" id="telephone" name="telephone" placeholder="请输入联系人电话" autocomplete="off" class="layui-input">
			    </div>
			  </div>
		 <!-- <div class="layui-form-item">
			   <label class="layui-form-label">是否可用</label>
			    <div class="layui-input-block">
					<select id="useable" name="useable">
		              <option value="">请选择</option>
		              <option value="Y">可用</option>
		              <option value="N">禁用</option>
		            </select>			   
		        </div>
		</div> -->
		<div class="layui-form-item">
    		<label class="layui-form-label">是否可用</label>
    		<div class="layui-input-block">
      			<input type="radio" id="useable" name="useable" value="Y" title="可用">
      			<input type="radio" id="useable" name="useable" value="N" title="禁用">
   		</div>
  </div>
		<!-- <div class="layui-form-item">
			<div id="l-map" style="margin-left: 40px; width: 438px; height: 200px; text-align: right;"></div>
		</div> -->

		<div class="layui-input-block" style="text-align: right;">
			<button type="submit" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="updatebusStationBtn">修改</button>
			<button type="button" class="layui-btn layui-btn-primary  modalClose">关闭</button>
			
		</div>
		</form>
	</div>
	<!-- 修改模态框 End -->
<script type="text/javascript" src="static/js/route/resource/map.js"></script>
<script type="text/javascript" src="static/js/route/resource/index.js"></script>
</body>
<script type="text/html" id="checkboxTpl">
			<span {{d.useable=='Y'? 'class="useable font-color font-size my-bg-green"': 'class="useable font-color font-size my-bg-red"'}}>{{d.useable=='Y'?'可用':'禁用'}}</span>
	</script>
<!-- 头部工具栏 -->
<script type="text/html" id="busStationToolbar">
  		<div class="layui-btn-group">
 			<button lay-event="addbusStation" class=" layui-btn layui-btn-primary layui-btn-sm" title="添加" style="margin-right:15px;"><i class="layui-icon">&#xe654;</i>添加</button>
			<button lay-event="updatebusStation" class=" layui-btn layui-btn-primary layui-btn-sm" title="修改"><i class="layui-icon">&#xe642</i>修改 </button>
			<button lay-event="frozenRecord" class=" layui-btn layui-btn-primary layui-btn-sm" title="禁用"><i class="layui-icon">&#xe702;</i>禁用 </button>
			<button lay-event="restoreRecord" class=" layui-btn layui-btn-primary layui-btn-sm" title="恢复"><i class="layui-icon">&#xe666;</i>恢复 </button>
  		</div>
	</script>
<!-- 数据表格的自定义按钮 -->
<script type="text/html" id="barDemo">
  <a class="layui-btn dw layui-btn-xs" lay-event="edit">定位</a>
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

</html>